import React from 'react'
import prices from '../../helpers/price'
import { Typography, List, Radio } from 'antd'
const { Title } = Typography

function FilterByPrice({handleFilter}) {
  const onChange = (ev) => {handleFilter(ev.target.value)}
  return (
    <>
      <Title level={5}>按照价格筛选</Title>
      <Radio.Group onChange={onChange}>
        <List
          dataSource={prices}
          renderItem={item => (
          <List.Item>
            <Radio value={item.array}>{item.name}</Radio>
          </List.Item>
          )}
        />
      </Radio.Group>
      
    </>
  )
}

export default FilterByPrice
